def DRead():#用于输入DNA序列的函数，自带基础的检验功能
    DList = input("你好，请输入待转录的DNA片段")
    DList = DList.upper()
    if len(DList) == 0:
        print("您似乎没有输入任何内容，请重试")
        return [0]
    if len(DList)%3 != 0:
        print("您输入的序列长度不是3的倍数，请重试")
        return [0]
    for i in DList:
        if i not in ["A", "T", "G", "C"]:
            print("您输入的序列中含有异常碱基，请重试")
            return [0]
    print("输入序列符合标准")
    return  [1, DList]

def 转录():
    a = [0]
    RList = str()
    while a[0] != 1:
        a = DRead()
    for i in a[1]:
        if i in ["A", "G", "C"]:
            RList = RList + i
        else:
            RList = RList + "U"
    print("已经完成转录，结果为：{}".format(RList))
    return RList